#include<bits/stdc++.h>
using namespace std;
int main(){
freopen("arema.in","r",stdin);
freopen("arema.out","w",stdout);
cout<<5<<endl<<19<<endl<<7<<endl<<1;
return 0;
}
